// 业务管理相关接口xxx
import axios from '../interceptors.js'

// 获取模板列表xxx
export const getTemplateList = data => {
  return axios({
    url: '/mark-template/list?sort=createdDate,desc',
    method: 'get',
    params: data
  })
}

// 保存模板
export const saveTemplate = data => {
  return axios({
    url: '/mark-template/create',
    method: 'post',
    data
  })
}

// 删除模板
export const delTemplate = data => {
  return axios({
    url: '/mark-template/del/' + data,
    method: 'delete'
  })
}

// 获取模板细节
export const getTemplateDetail = data => {
  return axios({
    url: `/mark-template/detail/${data.id}`
  })
}

// 获取模板细节
export const updateTemplate = data => {
  return axios({
    url: `/mark-template/update/${data.id}`,
    method: 'put',
    data: data.result
  })
}
